<%- include ../include/head %>
           <input type="hidden" value="book_add" id="js_current"/>
			<!-- Page Head -->
			<h2>Book</h2>
			<p id="page-intro">add</p>
			
			<div class="clear"></div> <!-- End .clear -->
			<div class="content-box"><!-- Start Content Box -->
				<div class="content-box-header">
					<h3>Content box</h3>
					
					<ul class="content-box-tabs">
						<li><a href="#tab2" class="default-tab">Forms</a></li>
					</ul>
					<div class="clear"></div>
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">

					<div class="tab-content default-tab" id="tab2">
						<form id="js_form" action="/admin/book/edit" method="post">
							<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
								<p>
									<label>hotel_id</label>
									<select name="hotel_id" class="small-input">
										<option value="option1">Option 1</option>
										<option value="option2">Option 2</option>
										<option value="option3">Option 3</option>
										<option value="option4">Option 4</option>
									</select>
								</p>
								<p>
									<label>user_id</label>
									<select name="user_id" class="small-input">
										<option value="option1">Option 1</option>
										<option value="option2">Option 2</option>
										<option value="option3">Option 3</option>
										<option value="option4">Option 4</option>
									</select>
								</p>
								<p>
									<label>room_type</label>
									<select name="room_type" class="small-input">
										<option value="option1">Option 1</option>
										<option value="option2">Option 2</option>
										<option value="option3">Option 3</option>
										<option value="option4">Option 4</option>
									</select>
								</p>
								<p>
									<label>check_in</label>
									<!--<input class="text-input medium-input js_datetime" type="text" id="medium-input" name="check_in" />-->
								<div class="controls input-append date js_datetime">
									<input class="text-input small-input" type="text" name="check_in" readonly value="<%= book.check_in %>"/>
									<span class="add-on"></span>
								</div>
								</p>
								<p>
									<label>check_out</label>
								<div class="controls input-append date js_datetime">
									<input class="text-input small-input" type="text" name="check_out" value="<%=  book.check_out%>"/><span class="add-on"></span>
								</div>
								</p>
								<p>
									<label>expires</label>
									<input class="text-input small-input" type="text" name="expires" value="<%=  book.expires%>" />
								</p>

								<p>
									<input class="button" type="submit" value="Submit" />
								</p>
							</fieldset>
							<div class="clear"></div><!-- End .clear -->
						</form>
					</div> <!-- End #tab2 -->
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->

<script>
	requirejs(["jquery","datetimerpicker","form"],function(){
		$('.js_datetime').find("input").click(function(){
			$(this).next().trigger("click");
		});

		$('.js_datetime').datetimepicker({
			pickTime: false,
			format: "yyyy-MM-dd"
		});

		var d = dialog();
		$("#js_form").form({
			onAccept: function(){
				d.content("更新成功");
				d.show();
				window.location.href="/admin/book/edit";
			}
		});

	});
</script>
<%- include ../include/foot %>